tools/dombuilder: Remove p2m_guest from the common interface
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 17 Dec 2019 17:41:36 +0000 (17:41 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 7 Jan 2020 12:46:03 +0000 (12:46 +0000)
commitd9b16799f633d94280d795a2903f8e6bd8bd7986
tree6430adf5d65c46c2f006a85d628a1960ac9bda1e
parentf8218e4792cc092845ce24d10630cd87100e59a2
tools/dombuilder: Remove p2m_guest from the common interface

In-guest p2m's are a concept specific to x86 PV guests.  alloc_p2m_list() is
the only hook which initialises dom->p2m_guest, making
xc_dom_update_guest_p2m() a nop for non-PV guests.

Move p2m_guest into xc_dom_image_x86 and adjust alloc_p2m_list() to match.

Drop xc_dom_update_guest_p2m() entirely.

One caller, move_l3_below_4G(), only uses it to modify a single entry, so
rewriting the whole guest p2m is wasteful - opencode the single update
instead.  The other caller is common code.  Instead, move the logic into the
setup_pgtables() hooks, which know their own sizeof_pfn and can do away with
the switch statement.

No change in the constructed guests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
stubdom/grub/kexec.c
tools/libxc/include/xc_dom.h
tools/libxc/xc_dom_boot.c
tools/libxc/xc_dom_core.c
tools/libxc/xc_dom_x86.c